import Flutter
import UIKit

public class FlutterNsBlePlugin: NSObject, FlutterPlugin {
    
  public static func register(with registrar: FlutterPluginRegistrar) {
    let channel = FlutterMethodChannel(name: "flutter_ns_ble", binaryMessenger: registrar.messenger())
    let instance = FlutterNsBlePlugin()
    registrar.addMethodCallDelegate(instance, channel: channel)
      let peripheralManager = PeripheralManager()
      PeripheralMethodSetup.setUp(binaryMessenger: registrar.messenger(), api: peripheralManager)
      ProvidePeripheralEventStreamHandler.register(with: registrar.messenger(), streamHandler: peripheralManager)
      ProvideLogEventStreamHandler.register(with: registrar.messenger(), streamHandler: peripheralManager.logEventHandler)
  }

  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
    
  }
}
